﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Diablo3.Engine.Property
{
    /// <summary>
    /// 攻速百分比加成
    /// </summary>
    public class AttackSpeedPercent : ItemsProperty, IAffecteAttackSpeedPercent
    {
        public AttackSpeedPercent() { }

        public AttackSpeedPercent(Double value)
        {
            Value = value;
        }

        /// <summary>
        /// 攻速加成百分比值
        /// </summary>
        public double Value { get; set; }

        public override string Des
        {
            get { return String.Format("+{0}% 攻速", Value); }
        }

        #region IAffecteAttackSpeedPercent 成员

        double IAffecteAttackSpeedPercent.Affecte(double source)
        {
            return source * (1 + Value / 100);
        }

        #endregion
    }
}
